<?php
class SluggableListener extends Doctrine_Record_Listener
{
    public function preInsert(Doctrine_Event $event) {
        $event->getInvoker()->slug = Url::title($event->getInvoker()->title);
    }
}